|
velaif820 2.2.0
|
API for configuring and manipulating Vela IF820 Click driver. More...
Topics | |
| Vela IF820 Device Settings | |
| Settings for registers of Vela IF820 Click driver. | |
| Vela IF820 MikroBUS Map | |
| MikroBUS pin mapping of Vela IF820 Click driver. | |
Functions | |
| void | velaif820_cfg_setup (velaif820_cfg_t *cfg) |
| Vela IF820 configuration object setup function. | |
| err_t | velaif820_init (velaif820_t *ctx, velaif820_cfg_t *cfg) |
| Vela IF820 initialization function. | |
| err_t | velaif820_generic_write (velaif820_t *ctx, uint8_t *data_in, uint16_t len) |
| Vela IF820 data writing function. | |
| err_t | velaif820_generic_read (velaif820_t *ctx, uint8_t *data_out, uint16_t len) |
| Vela IF820 data reading function. | |
| void | velaif820_set_rst_pin (velaif820_t *ctx, uint8_t state) |
| Vela IF820 set RST pin function. | |
| void | velaif820_reset_device (velaif820_t *ctx) |
| Vela IF820 reset device function. | |
| void | velaif820_set_rts_pin (velaif820_t *ctx, uint8_t state) |
| Vela IF820 set RTS pin function. | |
| uint8_t | velaif820_get_cts_pin (velaif820_t *ctx) |
| Vela IF820 get CTS pin function. | |
| uint8_t | velaif820_get_hwe_pin (velaif820_t *ctx) |
| Vela IF820 get HWE pin function. | |
| void | velaif820_set_cmd_mode (velaif820_t *ctx) |
| Vela IF820 set cmd mode function. | |
| void | velaif820_set_data_mode (velaif820_t *ctx) |
| Vela IF820 set data mode function. | |
| void | velaif820_cmd_action (velaif820_t *ctx, uint8_t *cmd, uint8_t *params) |
| Vela IF820 cmd action function. | |
| void | velaif820_cmd_set (velaif820_t *ctx, uint8_t *cmd, uint8_t *params) |
| Vela IF820 cmd set function. | |
| void | velaif820_cmd_get (velaif820_t *ctx, uint8_t *cmd, uint8_t *params) |
| Vela IF820 cmd get function. | |
| void | velaif820_cmd_profile (velaif820_t *ctx, uint8_t *cmd, uint8_t *params) |
| Vela IF820 cmd profile function. | |
| err_t | velaif820_read_packet (velaif820_t *ctx) |
| Vela IF820 read packet function. | |
API for configuring and manipulating Vela IF820 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void velaif820_cfg_setup | ( | velaif820_cfg_t * | cfg | ) |
Vela IF820 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See velaif820_cfg_t object definition for detailed explanation. |
| void velaif820_cmd_action | ( | velaif820_t * | ctx, |
| uint8_t * | cmd, | ||
| uint8_t * | params ) |
Vela IF820 cmd action function.
This function sends a specified action command to the Click module.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see VELAIF820_CMD_x action definitions. |
| [in] | params | : Command arguments string (optional). |
| void velaif820_cmd_get | ( | velaif820_t * | ctx, |
| uint8_t * | cmd, | ||
| uint8_t * | params ) |
Vela IF820 cmd get function.
This function sends a specified get command to the Click module.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see VELAIF820_CMD_x set/get definitions. |
| [in] | params | : Command arguments string (optional). |
| void velaif820_cmd_profile | ( | velaif820_t * | ctx, |
| uint8_t * | cmd, | ||
| uint8_t * | params ) |
Vela IF820 cmd profile function.
This function sends a specified profile command to the Click module.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see VELAIF820_CMD_x profile definitions. |
| [in] | params | : Command arguments string (optional). |
| void velaif820_cmd_set | ( | velaif820_t * | ctx, |
| uint8_t * | cmd, | ||
| uint8_t * | params ) |
Vela IF820 cmd set function.
This function sends a specified set command to the Click module.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see VELAIF820_CMD_x set/get definitions. |
| [in] | params | : Command arguments string. |
| err_t velaif820_generic_read | ( | velaif820_t * | ctx, |
| uint8_t * | data_out, | ||
| uint16_t | len ) |
Vela IF820 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
>0 - Number of data bytes read, <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation. | err_t velaif820_generic_write | ( | velaif820_t * | ctx, |
| uint8_t * | data_in, | ||
| uint16_t | len ) |
Vela IF820 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| [in] | data_in | : Data buffer for sending. |
| [in] | len | : Number of bytes for sending. |
>=0 - Success, <0 - Error. See #err_t definition for detailed explanation. | uint8_t velaif820_get_cts_pin | ( | velaif820_t * | ctx | ) |
Vela IF820 get CTS pin function.
This function returns the clear to send pin logic state.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| uint8_t velaif820_get_hwe_pin | ( | velaif820_t * | ctx | ) |
Vela IF820 get HWE pin function.
This function returns the IF820 ready pin logic state.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| err_t velaif820_init | ( | velaif820_t * | ctx, |
| velaif820_cfg_t * | cfg ) |
Vela IF820 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See velaif820_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t velaif820_read_packet | ( | velaif820_t * | ctx | ) |
Vela IF820 read packet function.
This function reads a response or event packet from the Click module and stores it in ctx->evt_pkt structure.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void velaif820_reset_device | ( | velaif820_t * | ctx | ) |
Vela IF820 reset device function.
This function resets the device by toggling the reset pin logic state.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| void velaif820_set_cmd_mode | ( | velaif820_t * | ctx | ) |
Vela IF820 set cmd mode function.
This function sets the command mode by setting the SPP pin to high logic state.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| void velaif820_set_data_mode | ( | velaif820_t * | ctx | ) |
Vela IF820 set data mode function.
This function sets the data mode by setting the SPP pin to low logic state.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| void velaif820_set_rst_pin | ( | velaif820_t * | ctx, |
| uint8_t | state ) |
Vela IF820 set RST pin function.
This function sets the reset pin logic state.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |
| void velaif820_set_rts_pin | ( | velaif820_t * | ctx, |
| uint8_t | state ) |
Vela IF820 set RTS pin function.
This function sets the request to send pin logic state.
| [in] | ctx | : Click context object. See velaif820_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |